package Gamefield;

public class FieldPosition {
	private int _row;
	private int _col;
	private boolean _drop;
	
	public boolean isDrop() {
		return _drop;
	}

	public void setDrop(boolean drop) {
		this._drop = drop;
	}

	public FieldPosition(int row, int col){
		this._row = row;
		this._col = col;
	}
	
	public FieldPosition(boolean drop) {
		this._drop = drop;
	}

	public int getRow() {
		return _row;
	}
	public void setRow(int row) {
		this._row = row;
	}
	public int getCol() {
		return _col;
	}
	public void setCol(int col) {
		this._col = col;
	}
	public String toString(){
		if(_drop){
			return "DR";
		} else {
			return getColFromInt(_col)+(_row +"");
		}
	}

	private char getColFromInt(int number){
		char character;
		if (number == 1){
			character = 'A'; 
		} else if(number == 2){
			character = 'B';
		} else if(number == 3){
			character = 'C'; 
		} else {
			character = '!';
		}
		
		return character;
	}
}
